package de.esk.fraunhofer.ECM_DatenbankOperation.Update;

import de.esk.fraunhofer.XmlStr;
import de.esk.fraunhofer.XMLAnalyser.XML_WFWItem;

public class Update_WFW {
private XML_WFWItem wfw;
	
	private StringBuffer a=new StringBuffer(XmlStr.updateWFW);
	
	public Update_WFW(XML_WFWItem wfw) {
		this.wfw=wfw;
	}
	
	@Override
	public String toString(){
		
		a.append(XmlStr.BEGIN_XML_TAG_WFW_ID)
			.append(wfw.getID())
		 .append(XmlStr.END_XML_TAG_WFW_ID)
		 
		 .append(XmlStr.BEGIN_XML_TAG_WOCHENTAGE)
		 	.append(wfw.getWochentage())
		 .append(XmlStr.END_XML_TAG_WOCHENTAGE)
		 
		 .append(XmlStr.BEGIN_XML_TAG_WFW_WH)
		 	.append(wfw.getWh())
		 .append(XmlStr.END_XML_TAG_WFW_WH)
		 
		.append(XmlStr.BEGIN_XML_TAG_WFW_STUNDEN)
		 	.append(wfw.getStunden())
		 .append(XmlStr.END_XML_TAG_WFW_STUNDEN)
		 
		 .append(XmlStr.BEGIN_XML_TAG_WFW_MINUTE)
		 	.append(wfw.getMinute())
		 .append(XmlStr.END_XML_TAG_WFW_MINUTE)
		 
		 .append(XmlStr.BEGIN_XML_TAG_WFW_SECOND)
		 	.append(wfw.getSekunde())
		 .append(XmlStr.END_XML_TAG_WFW_SECOND)
		 
		 .append(XmlStr.END_UPDATE);
		
		return new StringBuilder(XmlStr.root)
		.append(a)
		.append(XmlStr.end)
		.toString();
	}
}
